#include "widget.h"
#include "ui_widget.h"
#include "mainpage.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_loginButton_clicked()
{
    mainpage *newpage = new mainpage(nullptr);
    newpage->show();
    this->close();
}


void Widget::on_registerButton_clicked()
{
    ui->stackedWidget->setCurrentIndex(2);
}


void Widget::on_modify_2_clicked()
{
    ui->stackedWidget->setCurrentIndex(0);
}


void Widget::on_modify_3_clicked()
{
     ui->stackedWidget->setCurrentIndex(0);
}


void Widget::on_modifyButton_clicked()
{
    ui->stackedWidget->setCurrentIndex(1);
}

